@extends('home.pc.public.public')

@section('main')
    <div class="miya_info">
        <div class="miya_info_left">
            <div class="miya_template_left_box">
                <h3 class="miya_template_left_box_title">{{ $chunk['name'] }}</h3>
                <ul class="miya_template_left_box_ul">
                    @foreach($sorts['product'] as $value)
                        <li><a href="{{ route('sort',['product',$value['id']]) }}">{{ $value['name'] }}</a></li>
                    @endforeach
                </ul>
            </div>
            @include('home.pc.public.left')
        </div>
        <div class="miya_info_right frame_box">
            <h3 class="miya_info_right_product_title">{{ $info['name'] }}</h3>
            <p class="miya_info_right_date">发布时间 : {{ $info['time'] }}</p>
            @include('home.pc.public.frame')
            <div class="miya_info_right_product">
                <div class="miya_info_right_product_top">
                    <div class="miya_info_right_product_top_left">
                        <!-- 图片展示 CSS -->
                        <link href="/public/boots/js/cloudzoom/cloudzoom.css?a=a" rel="stylesheet"/>
                        <div class="jqueryzoom">
                            <img id="img" class="cloudzoom" src="{{ $info['images'][0] or '' }}"
                                 data-cloudzoom="zoomSizeMode:'image',zoomImage: '{{ $info['images'][0] or '' }}',autoInside: 30"/>
                        </div>
                        <!--想切换多张图片，只需要改下面img中src中的路径，以及data-cloudzoom中两个img的路径，注意data-cloudzoom要和img中的路径一摸一样-->
                        <ul class="cz">
                            @if(!empty($info['images']))
                                @foreach($info['images'] as $image)
                                    <li>
                                        <img class="cloudzoom-gallery" src="{{ $image }}"
                                             data-cloudzoom="useZoom:'.cloudzoom',image:'{{ $image }}',zoomImage:'{{ $image }}'"/>
                                    </li>
                                @endforeach
                            @endif
                        </ul>
                        <!-- 图片展示 js -->
                        <script src="/public/boots/js/cloudzoom/cloudzoom.js"></script>
                        <!--启动CloudZoom就可以了，quickStart()立即启动-->
                        <script type="text/javascript">
                            CloudZoom.quickStart();
                        </script>
                    </div>
                    <ul class="miya_info_right_product_top_right">
                        <li>标签 : <a href="{{ route('search',$info['tag']) }}">{{ $info['tag'] }}</a></li>
                        <li>访问量 : {{ $info['page_view'] }}</li>
                        {{--<li>--}}
                        {{--价格 : ¥{{ $info['price'] }}--}}
                        {{--<span class="original_price">¥{{ $info['original_price'] }}</span>--}}
                        {{--</li>--}}
                        <li class="miya_info_right_product_top_right_simpledescribe">简介
                            : {{ $info['simpledescribe'] }}</li>
                        <li class="miya_info_right_product_top_right_btn">
                            <a target="_blank"
                               href="http://wpa.qq.com/msgrd?v=3&uin={{ explode(',',config('set.web_kf'))[0] }}&site=qq&menu=yes">在线客服</a>
                            <a target="_blank" href="{{ route('message',$info['id']) }}">留言/评论</a>
                        </li>
                    </ul>
                    <div class="clearfix"></div>
                </div>
                <div class="miya_info_right_product_center">{!! $info['describe'] !!}</div>
                <ul class="miya_info_right_page_link">
                    @if(!empty($prev))
                        <li>上一条 : <a href="{{ route('info',['product',$prev['id']]) }}">{{ $prev['name'] }}</a></li>
                    @endif
                    @if(!empty($next))
                        <li>下一条 : <a href="{{ route('info',['product',$next['id']]) }}">{{ $next['name'] }}</a></li>
                    @endif
                </ul>
                <div class="miya_info_right_messagelist">
                    <div class="miya_info_right_messagelist_title">留言/评价</div>
                    <ul class="miya_info_right_messagelist_ul">
                        @if(!empty($messagelist))
                            @foreach($messagelist as $value)
                                <li>
                                    {!! implode('<br>',$value['data']) !!}
                                </li>
                            @endforeach
                        @else
                            <li>暂无信息</li>
                        @endif
                    </ul>
                    <div class="clearfix"></div>
                </div>
                <div class="miya_info_right_info_link">
                    <div class="miya_info_right_info_link_title">相关产品</div>
                    <ul class="miya_info_right_info_link_ul">
                        @foreach($links as $value)
                            <li class="miya_info_right_info_link_li">
                                <a href="{{ route('info',['product',$value['id']]) }}">
                                    <div class="miya_info_right_info_link_li_img">
                                        <img src="{{ $value['image'] }}" alt="">
                                    </div>
                                    <h4>{{ $value['name'] }}</h4>
                                </a>
                            </li>
                        @endforeach
                    </ul>
                    <div class="clearfix"></div>
                </div>
                <div class="miya_info_right_info_new">
                    <div class="miya_info_right_info_new_title">相关新闻</div>
                    <ul class="miya_info_right_info_new_ul">
                        @foreach($linkNews as $value)
                            <li>
                                <a href="{{ route('info',['new',$value['id']]) }}">
                                    {{ $value['name'] }}
                                </a>
                                <span>{{ $value['time'] }}</span>
                            </li>
                        @endforeach
                    </ul>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
@endsection